//
//  RequestTest.swift
//  ADKit_Example
//
//  Created by Adoma on 2020/10/25.
//  Copyright © 2020 CocoaPods. All rights reserved.
//

import Foundation
import ADKit

enum AdomaRequest {
    case testJson(t: Int)
}

extension AdomaRequest: RequestType {
    
    var host: String {
        switch self {
        case .testJson:
            return "https://gitee.com/adoma/adoma/raw/master"
        }
    }
    
    var path: String {
        switch self {
        case .testJson:
            return "/testJson"
        }
    }
    
    var parameters: Parameters? {
        switch self {
        case .testJson(let t):
            return ["t": t]
        }
    }
    
    var header: Header? {
        return ["name": "adoma"]
    }
    
    var cacheKey: String? {
        return "adoma"
    }
    
}


